package Moth;

public class Moth {

	private double position;
	
	//Creates new Moth
	public Moth(double initialPosition)
	{
		position = initialPosition;
	}
	
	// Moves to Light
	public void moveToLight(double lightPosition)
	{
		position = position + ((lightPosition - position) / 2);
	}
	
	//Returns position
	public double getPosition()
	{
		return position;
	}
}
